<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>



  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LiveValidation  - Chatter</title>
  <meta name="description" content="A javascript library for all your client-side and form validation needs.">
  <meta name="keywords" content="javascript, form, forms, validation, library, web2.0, ajax">
  <!-- yahoo user interface css 
      (reset - resets all defaults to be pretty much identical cross browser)
      (fonts - standardises default fonts styles crosss browser)
      (grids - provides cross browser positional styles for creating layouts) 
      see http://developer.yahoo.com/yui/grids/ -->
  <link rel="stylesheet" type="text/css" href="reset-fonts-grids.css">
  <link rel="stylesheet" type="text/css" href="consolidated_common.css">
  
  <!--[if IE]>
    <style type="text/css">
	  
	  #main li {
        width:auto;
      }
      
	  /* fix for fieldset background spill bug in all flavours of IE */
	  fieldset {
        position: relative;
        margin: 2em 0 1em 0;
      }
      legend {
        position: absolute;
        top: -0.5em;
        left: 0.2em;
      }
	  
    </style>
  <![endif]-->
  
  <!--[if IE 6]>
    <style type="text/css">
      #doc {
		 width:58em;
	  }
		
		#main .supportBox {
			margin-left:40px;
		}
	</style>
  <![endif]-->
  <script type="text/javascript" src="../../../classes/makumbaResources/javaScript/livevalidation_1.3_standalone.js"></script>
  	
</head><body id="top">
  <div id="bg">
	  <div id="doc">
	    <div id="hd">
	      <h1><a href="http://www.livevalidation.com/" title="home">LiveValidation</a></h1>
	      <h2>Validation as you type!</h2>
	      <ul id="head_nav">
	            <li><a href="http://www.livevalidation.com/download" title="download">download</a></li>  
	            <li><a href="http://www.livevalidation.com/documentation" title="documentation">documentation</a></li>
				<li><a href="http://www.livevalidation.com/examples" title="examples">examples</a></li>    
	      </ul>
	    </div>
	    <div id="topMain"> </div>
	    <div id="main">
			<div class="container_with_padding">
		  <h2>Chatter...</h2>
					<p>A place to give you updates until the site gets sorted with a proper blog. Time is being spent 
furthering the project at the moment, but you’re going to need to know about the improvements as they 
are made, so here goes...</p>
          <hr class="divider clearBoth">
					
			    <div class="date"><strong>24</strong>Feb</div>
					<div class="chatterBox">
						<h3>New release - version 1.3!</h3>
						<p>It’s
been a while since the last release, but that has allowed time for all
the great feedback to be acted upon. All that adds to up to quite a lot
of changes behind the scenes, and a lot of new functionality to allow
validations to be dynamically assigned/removed/destroyed, and to use
your own custom functions to validate against. </p>
						<p>Here’s a quick run down of what’s new:</p>
						<ul>
							<li>Validate.Custom
validation has been added so you can define your own custom function -
which if it returns true will pass the validation.</li>
							<li>Validate.Format now has a negate option, which if true will validate that the value DOES NOT match the regular expression.</li>
							<li>Validate.Inclusion
and Exclusion can both be made to treat strings case insensitively, by
setting the new caseSensitive option to false.</li>
							<li>File input fields are supported.</li>
							<li>Disabled
fields are now respected, and are not validated. The helper methods,
disable and enable, have been added to provide an easy way to do this,
while also removing any previous validation messages etc for that field</li>
							<li>You can remove specific validations that have been added to a LiveValidation field, using the new remove method.</li>
							<li>You
can destroy a LiveValidation object using the new destroy method.
Useful if you want to change the default values, or all of the
validations upon that field.</li>
							<li>Events system has had an
overhaul, so any predefined events that LiveValidation would otherwise
hijack are now preserved (meaning Rails ajax form helpers will now work
properly)</li>
							<li>LiveValidationForms get created in their own namespace rather than being made global.</li>
							<li>Various bug fixes</li>
							<li>Prototype version tested against prototype 1.6.0.2</li>
						</ul>
						<p>Documentation
is up to scratch so you can start using the new features, and examples
will be on their way over the next few days.</p>
            </div>
          
	
					
          <hr class="divider clearBoth">
					
			    <div class="date"><strong>25</strong>Sept</div>
					<div class="chatterBox">
						<h3>Version 1.2 is here!</h3>
						<p>This
release makes working with entire forms much easier, and the great
thing is that it is all automatic so you won’t have to do anything!
What it does mean however is that if you were using a previous version
using massValidate to perform validation when the form is submitted,
then you will no longer need to do that.</p>
            <p>When
a LiveValidation object is instantiated, it now checks if it belongs to
a form, and if it does then it automatically binds itself to the submit
event of that form. This means that when the form is submitted,
validation will be performed on all fields in it that have been made
into LiveValidation objects, and if any fail the form will not submit
and the messages will be shown to indicate the errors (<strong>please note</strong> - make sure you have appropriate
server-side validation too, as you cannot guarantee that the user will
have javascript enabled).</p>
            <p>This update also gives you
access to another option when instantiating a LiveValidation object -
onlyOnSubmit - which unsurprisingly
will mean that, if set to true, validation will only be performed when
the form is submitted.</p>
            <p>These
updates are demonstrated in the following example (although the outcome
is overidden if it is valid as this page has nowhere to submit to -
instead of submitting, it will alert that it is valid):</p>
	          <form id="formId_0389328139907798631218120547481" action="#" method="post">
        			<fieldset>
        			  <legend>Example of easy form validation</legend>
        				<p><label for="field1" class="displayBlock">Email (optional):</label><input id="field1" type="text"></p>
        				<p><label for="field2" class="displayBlock">Acceptance (required):</label><input id="field2" class="checkbox" type="checkbox"></p>
        				<p><label for="field3" class="displayBlock">Presence (required):</label><textarea id="field3" class="shallow" rows="2" cols="10"></textarea></p>
        		    <p><input class="submit" value="Test me!" type="submit"></p>
        		  </fieldset>
        		</form>
            <script type="text/javascript">
        			var field1 = new LiveValidation( 'field1', {onlyOnSubmit: true } );
        			field1.add( Validate.Email );
        			var field2 = new LiveValidation( 'field2', {onlyOnSubmit: true } );
        			field2.add( Validate.Acceptance );
        			var field3 = new LiveValidation( 'field3', {onlyOnSubmit: true } );
        			field3.add( Validate.Presence );
              
              var automaticOnSubmit = field1.form.onsubmit;
              field1.form.onsubmit = function(){
                var valid = automaticOnSubmit();
                if(valid)  alert('The form is valid!');
                return false;
              }
        	  </script> 
            <br>
            <pre><code lang="javascript">var field1 = new LiveValidation( 'field1', {onlyOnSubmit: true } );
field1.add( Validate.Email );
var field2 = new LiveValidation( 'field2', {onlyOnSubmit: true } );
field2.add( Validate.Acceptance );
var field3 = new LiveValidation( 'field3', {onlyOnSubmit: true } );
field3.add( Validate.Presence );</code></pre>
    			  <br>	
            <p>As you can see above, you no longer need to do anything in order to work with the form itself.</p>
					</div>
          
					<hr class="divider clearBoth">
					
			    <div class="date"><strong>18</strong>Sept</div>
					<div class="chatterBox">
						<h3>Version 1.1 is out!</h3>
						<p>Support for select elements has been added, which works in exactly the same way as you are used to for inputs and textareas:</p>
	          <p>Select something: 
		          <select id="mySelect" class="large">
								<option value="Please select..." selected="selected">Please select...</option>
								<option value="Live">Live</option>
								<option value="Validation">Validation</option>
							</select>
		          <script type="text/javascript">
		            var mySelect = new LiveValidation('mySelect');
		            mySelect.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "Please select something!"});
		          </script>  
	          </p>
						<pre><code lang="javascript">var mySelect = new LiveValidation('mySelect');
sayHello.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "Please select something!"});</code></pre>
			      <br>
						
						<p>This update also adds a bit more flexibility to how validations are performed. 
You now have a couple of extra options when you instantiate a LiveValidation field, ‘onlyOnBlur’, 
and ‘wait’. Here are some examples:</p>

						<h4>onlyOnBlur</h4>
						<p>Setting ’onlyOnBlur‘ to be true will mean the validation will only be run when the field loses focus. 
When the field is focused, the previous indications of validation, the message element and the validation class 
on the field, are removed so as not to confuse the user.</p>
						<p>Must be filled in:
						  <input id="myBlur" type="text">
						  <script type="text/javascript">
						    var myBlur = new LiveValidation('myBlur', {onlyOnBlur: true});
						    myBlur.add( Validate.Presence );
						  </script>  
						</p>
						<pre><code lang="javascript">var myBlur = new LiveValidation('myBlur', {onlyOnBlur: true});
myBlur.add( Validate.Presence );</code></pre>
			      <br>
						
						<h4>wait</h4>
						<p>Setting
’wait‘ to a number (of milliseconds) will mean that the validation will
not run until your chosen wait time has elapsed since the last
keystroke ocurred.
This allows the user to type in their data without it saying it has
failed before they have had the chance to finish, by which time it may
be valid, but it will still be validated without having to leave the
field so they can change it easily. If the wait time is 300ms or more,
the validation message and field class are removed when the user starts
to type again, in order to avoid confusion.</p>
						<p>Required, and at least 10 characters:
						  <input id="myWait" type="text">
						  <script type="text/javascript">
						    var myWait = new LiveValidation('myWait', {wait: 300});
						    myWait.add( Validate.Presence );
								myWait.add( Validate.Length, {minimum: 10} );
						  </script>  
						</p>
						<pre><code lang="javascript">var myWait = new LiveValidation('myWait', {wait: 300});
myWait.add( Validate.Presence );
myWait.add( Validate.Length, {minimum: 10} );</code></pre>
			      <br>
	          <p class="last">So there you go, these new options will give you more control, which is nice because not everyone
wants to use it in the same way, now you don’t have to, enjoy!</p>
					</div>
					
					<p class="last clearBoth">
					

			</p></div>
		</div>
	    <div id="bottomMain"> </div>
	    <div id="ft">  
	        <ul id="foot_nav">
	        	<li><a href="http://www.livevalidation.com/" title="home">home</a></li>  
	            <li><a href="http://www.livevalidation.com/examples" title="examples">examples</a></li> 
	            <li><a href="http://www.livevalidation.com/documentation" title="documentation">docs</a></li>  
	            <li><a href="http://www.livevalidation.com/download" title="download">download</a></li>
							<li><a href="http://www.livevalidation.com/blog" title="blog">blog</a></li>  
	            <li><a href="http://www.livevalidation.com/support" title="support">support</a></li>
							<li><a href="http://www.livevalidation.com/contact" title="contact">contact</a></li>
							<li><a href="http://www.livevalidation.com/license" title="license">license</a></li>   
	        </ul>
			<br>
			<p>© 2007-2008 Alec Hill | MIT license</p>
	    </div>
	  </div>
  </div>

</body>
